/*
 * =====================================================================================
 *
 *       Filename:  Fifo.h
 *
 *    Description:  Fifo
 *
 *        Version:  1.0
 *        Created:  2009-12-29 17:49:21
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  (jionfull), jionfull@163.com
 *        Company:  
 *
 * =====================================================================================
 */



#ifndef  FIFO16_H_INC
#define  FIFO16_H_INC
#include "typedef.h"


/*-----------------------------------------------------------------------------
 *FiFo 缂佹挻鐎�姘疅
 *-----------------------------------------------------------------------------*/
typedef struct StruFifo16{
					    uint16  *buf;
						uint16 rdPoint; 
						uint16 wrPoint; 
						uint16 len;    
						uint8 flag;    
						} Fifo16;
void Fifo16_Init (Fifo16 *fifo,uint16 *buf,uint16 len);
unsigned char Fifo16_CheckNoEmpty ( Fifo16 *fifo );
unsigned char Fifo16_CheckFull (Fifo16 *fifo );
unsigned char  Fifo16_Read (Fifo16 *fifo,uint16 *rdChar) ; 
void Fifo16_Write (Fifo16 *fifo,uint16 wrChar);
char Fifo16_GetValue(Fifo16 *fifo,uint16 *result,uint16 pos);
char Fifo16_GetHisValue(Fifo16 *fifo,uint16 *result,uint16 pos);
#endif  
